
const express = require('express');

const router = express.Router();
const crawl = require('../controller/crawl');

router.get('/getDataSourceList', crawl.getDataSourceList);
router.get('/getDataSourceById/:data_source_id', crawl.getDataSourceList);
router.post('/saveDataSource', crawl.saveDataSource);

router.get('/getGrabSourceList', crawl.getGrabSourceList);
router.get('/getGrabSourceById/:station_id', crawl.getGrabSourceList);
router.post('/saveGrabSource', crawl.saveGrabSource);

router.get('/getRuleList', crawl.getRuleList);
router.get('/getRuleInfoById/:config_id', crawl.getRuleList);
router.post('/saveRuleInfo', crawl.saveRuleInfo);
router.get('/deleteRuleInfo/:config_id', crawl.deleteRuleInfo);

router.get('/getStorageModelList', crawl.getStorageModelList);
router.get('/getStorageModelById/:model_id', crawl.getStorageModelList);
router.post('/saveStorageModel', crawl.saveStorageModel);
router.get('/deleteStorageModel/:model_id', crawl.deleteStorageModel);

router.get('/getInfoTypeList', crawl.getInfoTypeList);
router.get('/getInfoTypeById/:info_type_id', crawl.getInfoTypeList);
router.post('/saveInfoType', crawl.saveInfoType);

router.get('/getCategoryList', crawl.getCategoryList);
router.get('/getCategoryById/:category_id', crawl.getCategoryList);
router.get('/getCategoryTree', crawl.getCategoryTree);
router.post('/saveCategory', crawl.saveCategory);

router.get('/getMonitorConfList', crawl.getMonitorConfList);
router.get('/getMonitorConfById/:monitor_id', crawl.getMonitorConfList);
router.post('/saveMonitorConf', crawl.saveMonitorConf);

router.get('/getBusinessDetailsList', crawl.getBusinessDetailsList);
router.get('/getBusinessDetailsById/:businessId', crawl.getBusinessDetailsList);
router.post('/saveBusinessDetails', crawl.saveBusinessDetails);

router.get('/getQueueLength/:queueName', crawl.getQueueLength);

router.post('/testRule', crawl.testRule);
router.post('/getTestRuleResult', crawl.getTestRuleResult);
router.post('/saveTestRuleResult', crawl.saveTestRuleResult);

module.exports = router;
